|
|
 |
|
|
|
|
7: theTransactionProcessor.theTransaction.TellerID = theUser.UserID
8: theTransactionProcessor.theTransaction.TransID = DEPOSITFUNDS
9: theTransactionProcessor.theTransaction.DateTimeStamp = Now
10: TransactionGroup.Add
theTransactionProcessor.theTransaction.TellerID, _
11: theTransactionProcessor.theTransaction.TellerID, _
12: theTransactionProcessor.theTransaction.DataTimeStamp
13: End If
14: Exit Sub
15: depositErr:
16: theErrorHandler.handleErrors(Err)
17: End Sub |
|
|
|
|
|
|
|
|
The code for this lesson is disbursed across too many methods for all of them to be listed here. Refer to the CD-ROM for all of the source code. You will add some error-handling calls in the exercises. However, Listing 18.7 shows how ErrorHandler collaborates with modErrorHandling and the DBRdoConnection class to trap and process errors related to connecting to an RDO source. |
|
|
|
|
|
|
|
|
LISTING 18.7.ErrorHandlerCOLLABORATES WITHmodErrorHandlingAND THEDBRdoConnectionCLASS TO TRAP AND PROCESS ERRORS RELATED TO CONNECTING TO AN RDO SOURCE. |
|
|
|
 |
|
|
|
|
1:
2: 'Declared in modErrorHandling module
3: 'Used by the handleDBErrors method of
4: 'ErrorHandler
5: Public Enum eDBErrors
6: RDOErr
7: DAOErr
8: ADOErr
9: End Enum
10: 'Declared in DBRdoConnection
11: Public Function executeSQL(argSQL As String)
12: On Error GoTo executeSQLErr
13: Dim iErrCnt As Integer
14: ms_SQL = argSQL
15: If theAppTransactions.pTransLogIsOn Then
16: theAppTransactions.addTrans2Text Attempting to execute SQL
string==> & ms_SQL
17: End If
18: 'Returns the number of records affected
|
|
|
|
|
|